import React, { Component } from 'react';
import PropTypes from 'prop-types';

import './login.less';

export default class Login extends Component {
    constructor(props) {
        super(props);

        this.state = {
            formData: {
            }
        }
    }
    selectFromDataChange(e) {
        var data = this.state.fromData;
        if (e.target.name) {
            data[e.target.name] = e.target.value;
        }
        this.setState({
            fromData: data
        });
    }
    render() {
        return (<div className="mm-login-main">
            <div className="mm-login-content">
                <div className="mm-login-logo">

                </div>
                <div className="mm-login-input">
                    <Input name="loginUser" onChange={this.selectFromDataChange.bind(this)} value={this.state.fromData.loginUser} placeholder="账号" />
                </div>
                <div className="mm-login-input">
                    <Input type="password" name="password" onChange={this.selectFromDataChange.bind(this)} value={this.state.fromData.password} placeholder="密码" />
                </div>
                <div className="mm-login-input">
                    <input type="button" onClick={this.clickHandle.bind(this)} value="立即登陆" className="submit_btn" />
                </div>
            </div>
        </div>);
    }
}
Login.propTypes = {

};
Login.defaultProps = {
    checkLogin: function () {

    }
};